package com.cool.service.addshop.impl;

import com.cool.bo.addbo.AddBo;
import com.cool.bo.addbo.SelectBig;
import com.cool.bo.addbo.SelectBigBo;
import com.cool.bo.addbo.classbo.ClassBo;
import com.cool.bo.merbo.Mer;
import com.cool.mapper.addmapper.AddMapper;
import com.cool.po.bigclasspo.BigClassPo;
import com.cool.po.brand.BrandPo;
import com.cool.po.shoppo.ShopPo;
import com.cool.po.smallclasspo.SmallClassPo;
import com.cool.service.addshop.AddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AddServiceImpl implements AddService {
    @Autowired
    private AddMapper addMapper;

    @Override
    public List<ShopPo> getshopName() {
        List<ShopPo> list = addMapper.getshopName();
        return list;
    }

    @Override
    public List<BigClassPo> getBigClass() {
        List<BigClassPo> list = addMapper.getBigClass();
        return list;
    }

    @Override
    public List<SmallClassPo> getSmallClass(SelectBigBo selectBigBo) {
        List<SmallClassPo> list = addMapper.getSmallClass(selectBigBo);
        return list;
    }

    @Override
    public List<BrandPo> getBrand() {
        List<BrandPo> list = addMapper.getBrand();
        return list;
    }

    @Override
    public void addMer(Mer mer) {
        addMapper.addMer(mer.getShopInfo());
    }

    @Override
    public void addmerBig(Mer mer) {
        addMapper.addmerBig(mer.getShopInfo());
    }

    @Override
    public void addbrand(Mer mer) {
        addMapper.addbrand(mer.getShopInfo());
    }
    //查询出大类小类
    @Override
    public  List<Map<String, Object>> getBigSmall(Mer mer) {
        List<Map<String, Object>> list  = addMapper.getBigSmall(mer.getShopInfo());
        return list;
    }


    //查询出所有i信息
    @Override
    public List<Map<String, Object>> getMer() {
        List<Map<String, Object>> list = addMapper.getMer();
        return list;
    }

    @Override
    public void addClass(ClassBo classBo) {
        addMapper.addClass(classBo);
    }
}
